import axios from "axios";

const get = (url, params, clearFn)=>{
    new Promise((resolve)=>{
        axios.get(url, {params})
        .then((result)=>{
            let res;
            if(!clearFn !== undefined) {
                res = clearFn(result.data)
            } else {
                res = result.data
            }
            resolve([null, res])
        })
    })
}